/**
 * 获取当前url指定参数值
 * @param query 参数名
 * @param search 指定字符
 * @returns 参数值
 */
export function getQueryStr(query: string, search?: string) {
  const searchStr = search || location.search;
  const params = new URLSearchParams(searchStr);
  return params.get(query);
}
